package cn.aitrox.ry.service.auth.api;

import cn.aitrox.ry.bean.RespResult;
import cn.aitrox.ry.service.auth.dto.group.in.AuthGroupCreateInDto;
import cn.aitrox.ry.service.auth.dto.group.in.AuthGroupUpdateInDto;
import cn.aitrox.ry.service.auth.dto.group.out.AuthGroupDetailDto;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

public interface AuthGroupApi {

    @PostMapping(value = "/auth/group")
    RespResult<Integer> create(@RequestBody AuthGroupCreateInDto input);

    @PutMapping(value = "/auth/group")
    RespResult update(@RequestBody AuthGroupUpdateInDto input);

    @GetMapping(value = "/auth/group{id}")
    RespResult<AuthGroupDetailDto> read(@PathVariable("id") Integer id);

    @DeleteMapping(value = "/auth/group/{id}")
    RespResult delete(@PathVariable("id") Integer id);

    @GetMapping(value = "/auth/group/all")
    List<AuthGroupDetailDto> all();

}
